package com.quark.mapper.system;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.quark.model.system.user.SysUser;
import com.quark.model.system.user.UserPageVO;
import com.quark.model.system.user.dto.UserDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 张高昌
 * @date 2021/11/1 20:50
 * @description TODO
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    SysUser selectByUserName(@Param("userName") String userName);

    /**
     * 删除用户
     *
     * @param id
     * @return
     */
    int deleteByPrimaryKey(long id);

    int insertSelective(SysUser record);

    int updateByPrimaryKeySelective(SysUser record);

    /**
     * 用户分页查询
     *
     * @param model
     * @return
     */
    IPage<UserDTO> selectPageVo(Page page,@Param("query") UserPageVO model);
}
